cmake_minimum_required(VERSION 3.21.2)

project(vetidx_client_simulator)
execute_process(COMMAND git log -1 --pretty=format:%h . OUTPUT_VARIABLE version)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -O2 -lrt -Wall")

aux_source_directory(./  SRC_FILES_FUNC)

link_directories(
    ${PROJECT_SOURCE_DIR}/../../../../comm
    ${PROJECT_SOURCE_DIR}/../../../../3rdlib/google/lib
    ${PROJECT_SOURCE_DIR}/../../../../3rdlib/jsoncpp/lib
)

add_executable(vetidx_client_simulator  ${SRC_FILES_FUNC})

target_include_directories(vetidx_client_simulator PUBLIC
    ${PROJECT_SOURCE_DIR}/../../../../comm
    ${PROJECT_SOURCE_DIR}/../../../../3rdlib/jsoncpp/include
)

add_definitions(-DACTIVE_GIT_VERSION="${version}" -DMAIN)

target_link_libraries(vetidx_client_simulator PRIVATE protobuf protoc jsoncpp common ssl pthread dl)
set_target_properties(vetidx_client_simulator PROPERTIES RUNTIME_OUTPUT_DIRECTORY "../../bin")
